package net.hands.ado.db.event;

import net.hands.ado.ADOException;
import net.hands.ado.IADOListener;
import net.hands.ado.db.IDBManager;
import net.hands.ado.db.SQLValue;
import net.hands.common.ado.IParamsValue;

public interface IDBListener extends IADOListener {
	/**
	 * 
	 * @param service
	 * @param sqlValues
	 * @throws ADOException
	 */
	void onBeforeExecute(IDBManager manager, SQLValue[] sqlValues)
			throws ADOException;

	/**
	 * 
	 * @param service
	 * @param sqlValues
	 * @throws ADOException
	 */
	void onAfterExecute(IDBManager manager, SQLValue[] sqlValues)
			throws ADOException;

	/* delete event */

	void onBeforeDelete(IDBManager manager, IParamsValue paramsValue);

	void onAfterDelete(IDBManager manager, IParamsValue paramsValue);

	/* insert event */

	void onBeforeInsert(IDBManager manager, Object[] beans);

	void onAfterInsert(IDBManager manager, Object[] beans);

	/* update event */

	void onBeforeUpdate(IDBManager manager, String[] columns, Object[] beans);

	void onAfterUpdate(IDBManager manager, String[] columns, Object[] beans);

}
